package com.rk.kbk.dao;

import com.rk.kbk.model.Message;
import com.rk.kbk.model.MessageUnit;
import com.rk.kbk.model.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
 * Created by bilibili on 2017/3/14.
 */
public interface MessageUnitDao  extends JpaRepository<MessageUnit, Long>,JpaSpecificationExecutor {
          List<MessageUnit>  findByUser(User user);
          List<MessageUnit>  findByMessage(Message message) ;
}
